Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: next 10.0.8 changes loadConfig to be async #105

Merged
merged 6 commits into from
Mar 8, 2021

Conversation

lindsaylevine
Copy link

@lindsaylevine lindsaylevine commented Mar 3, 2021

Fixes #104

this means that sites using =>10.0.8 will be incompatible with plugin <= 2.0.1
BUT
sites using <=10.0.7 using plugin > 2.0.1 will still work at least 🙃

@lindsaylevine lindsaylevine added the type: bug code to address defects in shipped code label Mar 3, 2021
@ehmicky
Copy link

ehmicky commented Mar 4, 2021

I think you implied this @lindsaylevine, but just to confirm:

  • Both next <= 10.0.7 and next >= 10.0.8 should work after this PR, since awaiting a non-Promise is valid.
  • next >= 10.0.8 won't work without this PR, i.e. @netlify/plugin-nextjs <= 2.0.1 won't work for them.

@lindsaylevine lindsaylevine changed the base branch from main to merge-non March 4, 2021 21:51
@lindsaylevine lindsaylevine marked this pull request as draft March 5, 2021 16:47
@lindsaylevine lindsaylevine force-pushed the ll/fix-10.0.8-async-load-config branch from b46de96 to 04cfb47 Compare March 7, 2021 03:26
@lindsaylevine lindsaylevine marked this pull request as ready for review March 7, 2021 21:48
@@ -26,9 +26,11 @@ const transformManifestForI18n = (manifest) => {
return { ...manifest, routes: newRoutes }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not for now, but if we Promise.all these we'll get slightly better perf

const promises = items.map(async (item) => {
  return await thing(item);
})

await Promise.all(items);

// continue

not a dealbreaker by any means, but something that might help us eke some extra ms out of this

src/index.js Outdated Show resolved Hide resolved
@lindsaylevine lindsaylevine merged commit 040a627 into merge-non Mar 8, 2021
@lindsaylevine lindsaylevine deleted the ll/fix-10.0.8-async-load-config branch March 8, 2021 22:43
lindsaylevine added a commit that referenced this pull request Mar 8, 2021
* foundation: embed NoN into plugin under src/

* wip: updates to test paths, but things still aren’t working

* fix: use next@^10.0.6 for i18n

* 3.0.0@canary.1 release

* wip: start changelog entry for review

* chore: update version + installation instructions

* fix: edit for clarity

Co-authored-by: rstavchansky <rachael@netlify.com>

* fix: add link + edit for clarity

Co-authored-by: rstavchansky <rachael@netlify.com>

* fix: add UI-based install back in

* fix: add NoN migration guide link

* fix: include src in published package

* 3.0.0@canary.2 release

* fix: package description

* fix: next 10.0.8 changes loadConfig to be async (#105)

* fix: 10.0.8 changes loadConfig to be async

* wip: make literally everything async bc loadConfig

* wip: fix i18n bug, got 10.0.6 tests to pass

* wip: NoN tests pass on 10.0.8 but plugin test chdir fixture issue

* Fix bug with Jest

* fix: delete TO-DO

Co-authored-by: ehmicky <ehmicky@gmail.com>

Co-authored-by: Lindsay Levine <lindslev.ll@gmail.com>
Co-authored-by: rstavchansky <rachael@netlify.com>
Co-authored-by: lindsaylevine <57350178+lindsaylevine@users.noreply.github.com>
Co-authored-by: ehmicky <ehmicky@gmail.com>
lindsaylevine added a commit that referenced this pull request Mar 8, 2021
- feat: merge `next-on-netlify` into `@netlify/plugin-nextjs`

  This improves our ability to maintain the plugin, reduces confusion about how to configure Next.js support for Netlify builds, and prepares the plugin for something we're pretty dang excited about: automatic installation for new Next.js projects!

> **NOTE: There are no breaking changes for existing plugin users.** This is a major release because we're bringing an external package into the plugin _and_ turning on automatic installation for new Next.js projects on Netlify. This doesn't break anything, but it's a big enough change that we wanted to treat it as a major release.

- fix: next 10.0.8 changes loadConfig to be async ([#105](#105))
serhalp pushed a commit that referenced this pull request Apr 5, 2024
…rendered content (#105)

* feat: use publish dir constant when getting middlewareManifest

* feat: better error checking when copying static content

* feat: simply static content copying

* chore: better variable names for copying server content

* feat: rework prerendered content method

* chore: simplify static content logic

* fix: normalize prerendered index routes

* fix: explicity add prerendered not found routes

* feat: better guard against wrongly unpublishing static on failed builds

* fix: don't attempt to copy app router 404 page on page router site

* chore: fix static content tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10.0.8 breaks plugin (can't read config target)
4 participants